<template>
	<view class="page_box" style="background-color: #F5F8FD;">
		<view class="content_box">
			<view class="myTeam">
				<text style="margin-bottom: 20rpx;">
					我的团队
					<text>(人)</text>
				</text>
				<text>{{myTeam1.length}}</text>
			</view>
			<view
				class="list"
				v-for="(item, index) in myTeam1"
				:key="index"
				
			>
				<view class="left1">
					<image :src="item.avatar" mode=""></image>
					<text>{{ item.nickname }}</text>
				</view>
				<view class="right">
					<!-- <text class="text">{{ item.nickname }}</text> -->
				</view>
			</view>
		</view>
		<view class="foot_box"></view>
		<!-- 自定义底部导航 -->
		<shopro-tabbar></shopro-tabbar>
		<!-- 关注弹窗 -->
		<shopro-float-btn></shopro-float-btn>
		<!-- 连续弹窗提醒 -->
		<shopro-notice-modal></shopro-notice-modal>
		<!-- 登录提示 -->
		<shopro-login-modal></shopro-login-modal>
	</view>
</template>

<script>
export default {
	data() {
		return {
			myTeam1:[],
			
		};
	},
	computed: {},
	onLoad() {
		this.getUsers()
	},
	methods: {
		// 获取用户的id
		async getUsers() {
			const res = await this.$api('user.info');
			var uid = res.data.id;
			this.myTeam(uid);
			
		},
		//我的团队
		async myTeam(uid) {
			console.log('uid :>> ', uid);
			const res = await this.$api('myTeam', {
				uid: uid
			});
			console.log('我的团队 :>> ', res);
			this.myTeam1 = res;
			
		},
		
		
		
	}
};
</script>

<style lang="scss">
.content_box {
	.myTeam {
		width: 100vw;
		height: 200rpx;
		background: url('https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/11.png')
			no-repeat center;
		background-size: cover;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #ffffff;
		text {
			text {
				font-size: 27rpx;
			}
		}
	}
	.list {
		width: 690rpx;
		height: 100rpx;
		background: #ffffff;
		margin: 0 auto;
		margin-top: 20rpx;
		border-radius: 10rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 20rpx;
		.left1 {
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
			display: flex;
			align-items: center;
	
			image {
				width: 80rpx;
				height: 80rpx;
				border-radius: 50%;
				//background-color: red;
			}
			text {
				height: 28rpx;
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
				line-height: 28rpx;
				margin-left: 20rpx;
			}
		}
		.right {
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			align-items: flex-end;
			.text {
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #eabb6c;
				margin-left: 19rpx;
			}
		}
	}
	
	
}
</style>
